package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.ConfirmOrderMapper;
import com.ruoyi.business.domain.ConfirmOrder;
import com.ruoyi.business.service.IConfirmOrderService;

/**
 * 订单信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-06
 */
@Service
public class ConfirmOrderServiceImpl implements IConfirmOrderService 
{
    @Autowired
    private ConfirmOrderMapper confirmOrderMapper;

    /**
     * 查询订单信息
     * 
     * @param id 订单信息主键
     * @return 订单信息
     */
    @Override
    public ConfirmOrder selectConfirmOrderById(Long id)
    {
        return confirmOrderMapper.selectConfirmOrderById(id);
    }

    /**
     * 查询订单信息列表
     * 
     * @param confirmOrder 订单信息
     * @return 订单信息
     */
    @Override
    public List<ConfirmOrder> selectConfirmOrderList(ConfirmOrder confirmOrder)
    {
        return confirmOrderMapper.selectConfirmOrderList(confirmOrder);
    }

    /**
     * 新增订单信息
     * 
     * @param confirmOrder 订单信息
     * @return 结果
     */
    @Override
    public int insertConfirmOrder(ConfirmOrder confirmOrder)
    {
        confirmOrder.setCreateTime(DateUtils.getNowDate());
        return confirmOrderMapper.insertConfirmOrder(confirmOrder);
    }

    /**
     * 修改订单信息
     * 
     * @param confirmOrder 订单信息
     * @return 结果
     */
    @Override
    public int updateConfirmOrder(ConfirmOrder confirmOrder)
    {
        confirmOrder.setUpdateTime(DateUtils.getNowDate());
        return confirmOrderMapper.updateConfirmOrder(confirmOrder);
    }

    /**
     * 批量删除订单信息
     * 
     * @param ids 需要删除的订单信息主键
     * @return 结果
     */
    @Override
    public int deleteConfirmOrderByIds(Long[] ids)
    {
        return confirmOrderMapper.deleteConfirmOrderByIds(ids);
    }

    /**
     * 删除订单信息信息
     * 
     * @param id 订单信息主键
     * @return 结果
     */
    @Override
    public int deleteConfirmOrderById(Long id)
    {
        return confirmOrderMapper.deleteConfirmOrderById(id);
    }
}
